package com.yunshang.shoppingmall.mapper;

import com.yunshang.shoppingmall.entity.FinaceTotal;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface FinaceTotalMapper {
    int deleteByPrimaryKey(Integer fId);

    int insert(FinaceTotal record);

    int insertSelective(FinaceTotal record);

    FinaceTotal selectByPrimaryKey(Integer fId);

    int updateByPrimaryKeySelective(FinaceTotal record);

    int updateByPrimaryKey(FinaceTotal record);

    //查询用户财务余额
    FinaceTotal selectFinaceBalace(FinaceTotal finaceTotal);
    FinaceTotal selectFinaceBalaceAll(int userNoId);

    //查询用户所有财务余额
   FinaceTotal selectFinaceTotal(@Param("userNoId") int userNoId, @Param("fType") String fType);

    //跟新用户的积分余额
    int updateBalanceByUserIdAndFType(FinaceTotal finaceTotal);
}